import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int n = sc.nextInt();
            int m = sc.nextInt();
            System.out.println(med(m,n));
        }
    }
    public static int med(int n,int m){
        if((n == 1) && (m >= 1) || (m == 1) && (n >= 1)){
            return m + n;
        }
        return med(n - 1,m) + med(n,m - 1);
    }
}
